package com.xxxy.fallback;

import org.springframework.stereotype.Component;

import javax.swing.*;

@Component
public class SentinelFallback {

    public static String rtFallback(Throwable e) {
        String msg = "慢调用降级，请稍后再试";
        System.out.println(msg);
        System.out.println("异常信息: " + e.getMessage());
        return msg;
    }
    public static String exceptionFallback(Throwable e) {
        String msg = "服务异常，请稍后再试";
        System.out.println(msg);
        System.out.println("异常原因: " + e.getMessage());
        return msg;
    }
}
